﻿using System.Collections.Generic;
using System.Linq;

namespace Tuxedo.Compile
{
	internal class Property : IFPClassMember
	{
		public UnverifiedType Type { get; private set; }
		public string Name { get; private set; }
		public PropertyBody Getter { get; private set; }
		public PropertyBody Setter { get; private set; }
		public override MemberAttribute[] Attributes { get { return this.attributes; } }
		private MemberAttribute[] attributes;

		public Property(UnverifiedType type, string name, PropertyBody getter, PropertyBody setter, IList<MemberAttribute> attributes)
		{
			this.Type = type;
			this.Name = name;
			this.Getter = getter;
			this.Setter = setter;
			this.attributes = attributes.ToArray();
		}
	}
}
